import http from '../utils/axios'
import {BASE_URL} from "@/api/version";

/**
 * 登录接口
 */
export const goLogin=(data:any,config:any)=>{
    return http.post(BASE_URL+'login?time='+new Date().getTime(),data,config);
}

/**
 * 重新获取验证码接口
 */
export const randCode=(data:any)=>{
    return http.get(BASE_URL+'system/login/randCode'+data)
}
/**
 * 判断首次登录接口
 * @param data
 */
export const firstLogin=(data:any)=>{
    return http.post(BASE_URL+'system/selectUserOne',data)
}

export const timeout=()=>{
    return http.post(BASE_URL+'task/timeout/')
}
/**
 * 竞价菜单列表
 * @param data
 */
export const findMenuList=(data:any)=> {
    return http.post(BASE_URL + 'bidding/findMenuList',data)
}
/**
 * 详情
 * @param data
 */
export const detail=(data:any)=>{
    return http.post(BASE_URL+'task/detail',data)
}

/**
 * 提交
 * @param data
 */
export const saveQuote=(data:any)=>{
    return http.post(BASE_URL+'task/saveQuote',data)
}
/**
 *  菜单
 * @param data
 */
export const Menu=(data:any)=>{
    return http.post(BASE_URL+'system/menu/',data)
}
/**
 * 修改密码
 * @param data
 */
export const changePassword=(data:any,headers:any)=>{
    return http.post(BASE_URL+'system/changePassword',data,headers)
}

/**
 * 登出
 * @param data
 */
export const logout=()=>{
    return http.post('/czpt/j_spring_security_logout')
}

/**
 * 任务详情
 * @param data
 */
export const queryTasks=(data:any)=>{
    return http.post(BASE_URL+'queryTasks',data)
}

